home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
news
/
inn1.000
/
inn1.4sec-linux-src.tar
/
inn
/
lib
/
xwrite.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-03
|
409b
|
26 lines
/* $Revision: 1.2 $
**
*/
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include "clibrary.h"
/*
** Keep writing until everything has been written or we get an error.
*/
int
xwrite(fd, p, i)
register int fd;
register char *p;
register int i;
{
register int c;
for ( ; i; p += c, i -= c)
if ((c = write(fd, (POINTER)p, (SIZE_T)i)) <= 0)
return -1;
return 0;
}